package com.kgc.service;

import entity.Category;
import entity.ResponseMessage;

import java.util.List;

/**
 * @description: 分类service接口
 * @author: Cheng
 * @create: 2022-04-13 10:49
 **/
public interface ICategoryService{


    /**
     * 分页查询商品分类信息
     * @param pageNo
     * @param pageSize
     * @param cname
     * @param type
     * @param parentId
     * @return ResponseMessage
     */
    public ResponseMessage selectALL(int pageNo ,int pageSize,String cname ,int type ,int parentId);


    /**
     * 添加一条商品分类信息
     * @param category
     * @return  ResponseMessage
     */
    ResponseMessage insertCategoryInfo(Category category);

    /**
     * 更新一条商品分类信息
     * @param category
     * @return
     */
    ResponseMessage updateCategoryInfo(Category category);


    /**
     *删除单条商品分类
     * @param id
     * @return  ResponseMessage
     */
    ResponseMessage freezeCategoryInfo(String id);


    /**
     * 查询所有商品分类的type
     * @return List<Category>
     */
    List<Category> selectByCategoryType();


    /**
     * 通过type查找所有的商品分类信息
     * @param type
     * @return ResponseMessage
     */
    ResponseMessage selectInsetPageByType(int type);


    /**
     * 通过id查询单条数据
     * @param id
     * @return ResponseMessage
     */
    ResponseMessage selectCategoryById(String id);

    /**
     * 通过cname查询单条数据
     * @param cname
     * @return ResponseMessage
     */
    ResponseMessage selectInsetPageByCname(String cname);

    ResponseMessage selectUpdatePageByType(int type, String id);
}
